import * as types from '../../mutation-types/unread-news/index';

const state = {
    unreadNewsList : [],
    currentPage :1,
    totalCount : 1,
    receiverList : [],
    receiverCurrentPage :1,
    receiverTotalCount : 1
};

const mutations = {
	[types.UNREAD_NEWSLIST] (state , {unreadNewsList}){
		state.unreadNewsList = unreadNewsList;
	},
	[types.UNREAD_NEWSLIST_CURRENTPAGE] (state , {currentPage}){
		state.currentPage = currentPage;
	},
	[types.UNREAD_NEWSLIST_TOTALCOUNT] (state , {totalCount}){
		state.totalCount = totalCount;
	},
    [types.RECEIVER_LIST] (state , {receiverList}){
        state.receiverList = receiverList;
    },
    [types.RECEIVER_LIST_CURRENTPAGE] (state , {receiverCurrentPage}){
        state.receiverCurrentPage = receiverCurrentPage;
    },
    [types.RECEIVER_LIST_TOTALCOUNT] (state , {receiverTotalCount}){
        state.receiverTotalCount = receiverTotalCount;
    }
};

export default {
	state ,
	mutations
};
